﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Common.Utilities.TextMatch
{
    /// <summary>
    /// 
    /// </summary>
    public class TermWeight : IComparable
    {
        private string _Term;
        public string Term
        {
            get{
                return _Term;}
            set{
                _Term = value;}
        }
        private double _Weight;
        public double Weight
        {
            get
            {
                return _Weight;
            }
            set
            {
                _Weight = value;
            }
        }

        #region Implementation of IComparable
        public int CompareTo(object obj)
        {
            if (obj.GetType() == typeof(TermWeight))
            {
                TermWeight tw = (TermWeight)obj;
                return tw.Weight.CompareTo(this.Weight);
            }
            else
                return 0;
        }

        #endregion
    }
}
